-The greatest advantage about TDD is to craft the software design first
-Your code will be more reliable: after a change you can run your tests and be in peace
There are some details to pay attention. The first one is the test name. The tests can be considered as your alive documentation. We need to be descriptive about it and to say what is expected and what we are testing.
It’s ideal to separate the tests folder from production code (the implementation) and to have something like this:
mymodule/
— module.py
— another_folder/
— — another_module.py
tests/
— test_module.py
— another_folder/
— — test_another_module.py
The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive function. Using recursive algorithm, certain problems can be solved quite easily.
What is base condition in recursion? In the recursive program, the solution to the base case is provided and the solution of the bigger problem is expressed in terms of smaller problems.